package websocket;


import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import db.BCrypt;
import db.HibernateUtil;
import db.HooldusteenuseTellimus;
import db.Kinnistu;

public class TestClass {
	
	public static void main(String[] args) {
		SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
		Session s = sessionFactory.openSession();
		s.beginTransaction();
		HooldusteenuseTellimus a = (HooldusteenuseTellimus) s.get(HooldusteenuseTellimus.class, 1);
		System.out.println(a.getHooldusteenuseTellimuseNr());
		System.out.println(a.getKinnistu().getKinnistuTyyp().getNimetus());
		System.out.println(BCrypt.hashpw("test", BCrypt.gensalt()));
		List<Kinnistu> k = HibernateUtil.getKinnistud("testkasutaja");

	}

}
